<template>
<div>
    <div v-for="data in $store.state.comingList" :key="data.filmId" style="overflow: hidden; padding: 20px">
      <img :src="data.poster"  style="float: left; width: 140px"/>
      <h3>影名：<span style="font-size: 15px">{{data.name}}</span></h3>
      <h3>观众评分：{{data.grade}}</h3>
      <p v-if="data.actors">主演:{{data.actors | actorfilter}}</p>
      <p v-else>暂无主演</p>
    </div>
</div>
</template>

<script>
export default {
  name: "comingsoon",
  mounted() {
    if(this.$store.state.comingList.length===0){
//ajax请求
      this.$store.dispatch("getcomingListAction")

    }else {
      console.log("使用缓存")
    }
  }
}
</script>

<style scoped>

</style>
